using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using Lync.Widget.Library.Presence;
using Lync.Widget.Library.ServiceHelpers;


namespace Lync.Widget.Library.Services
{
    [ServiceContract]
    public interface ILyncService
    {
        [OperationContract]
        List<PresenceEntry> GetPersonsAndGroups(string query, string sips, string groups);
        
        [OperationContract]
        List<SipEntry> GetPersons(string query);

        [OperationContract]
        List<SipEntry> GetPersonsBySip(string sip);

        [OperationContract]
        List<GroupEntry> GetGroups(string groups);

        [OperationContract]
        List<GroupEntry> GetAllGroups();

        [OperationContract]
        List<GroupSubscription> GetGroupsPresence(string groups, string availability);

        [OperationContract]
        GroupSubscription GetGroupPresence(string groupid);
        
        [OperationContract]
        List<Subscription> GetPresences(string sipUris, string groups, string availability, bool init);

        [OperationContract]
        ServiceCallResponse InitChatSession(string session, string employeeSip, string username, string page, string title, string topic);

        [OperationContract]
        ServiceCallResponse InitGroupChatSession(string groupId, string session, string username, string page, string title, string topic, bool isInInitialMode);

        [OperationContract]
        ServiceCallResponse SendInstantMessage(string session, string message);

        [OperationContract]
        ServiceCallResponse SendInstantGroupMessage(string groupId, string session, string message);
        
        [OperationContract]
        [ServiceKnownType(typeof(MessageListServiceCallResponse))]
        ServiceCallResponse GetMessages(string session);

        [OperationContract]
        [ServiceKnownType(typeof(GroupMessageListServiceCallResponse))]
        ServiceCallResponse GetMessagesFromGroup(string groupId, string session);

        [OperationContract]
        string LogStatusReport();

        [OperationContract]
        string GetServiceStatus();

        [OperationContract]
        bool ResetAll();
    }
}
